<?php

use yii\db\Migration;
use yii\db\Schema;

class m170109_095650_a_column_product_room extends Migration
{
    public function up()
    {

         $this->addColumn('{{product_room}}', 'product_id', Schema::TYPE_INTEGER. "(1)  DEFAULT  '0' COMMENT '所属线路' ");
         $this->addColumn('{{product_room}}', 'show', Schema::TYPE_INTEGER. "(1)  DEFAULT  '0' COMMENT '0 不显示  1 显示' ");
         $this->addColumn('{{room}}', 'min', Schema::TYPE_INTEGER. "(1)  DEFAULT  '1' COMMENT '最少入住人数' ");
    }

    public function down()
    {
        echo "m170109_095650_a_column_product_room cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
